package com.wfs.spring.thread.Thread;



/**
 * @Auther: wfs
 * @Date: 2019/6/13 20:05
 * @Description:
 */
public class MyThread1 extends Thread {
    private Object look;
    public MyThread1(Object look){
        this.look=look;
    }

    @Override
    public void run() {
        try {
            synchronized (look){
                System.out.println("开始 wait time="+System.currentTimeMillis());
                look.wait();
                System.out.println("结束 wait time="+System.currentTimeMillis());
            }
        }catch (Exception e){
            e.printStackTrace();
        }

    }
}
